<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="gi143896">pg_matviews</title>
  <body>
    <p>The view <codeph>pg_matviews</codeph> provides access to useful information about each
      materialized view in the database.</p>
    <table id="gi143898">
      <title>pg_catalog.pg_conversion</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="131pt"/>
        <colspec colnum="2" colname="col2" colwidth="75pt"/>
        <colspec colnum="3" colname="col3" colwidth="101.25pt"/>
        <colspec colnum="4" colname="col4" colwidth="147pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry><codeph>schemaname</codeph></entry>
            <entry>name</entry>
            <entry>pg_namespace.nspname</entry>
            <entry>Name of the schema containing the materialized view</entry>
          </row>
          <row>
            <entry><codeph>matviewname</codeph></entry>
            <entry>name</entry>
            <entry>pg_class.relname</entry>
            <entry>Name of the materialized view</entry>
          </row>
          <row>
            <entry><codeph>matviewowner</codeph></entry>
            <entry>name</entry>
            <entry>pg_authid.rolname</entry>
            <entry>Name of the materialized view's owner</entry>
          </row>
          <row>
            <entry><codeph>tablespace</codeph></entry>
            <entry>name</entry>
            <entry>pg_tablespace.spcname</entry>
            <entry>Name of the tablespace containing the materialized view (NULL if default for the
              database)</entry>
          </row>
          <row>
            <entry><codeph>hasindexes</codeph></entry>
            <entry>boolean</entry>
            <entry> </entry>
            <entry>True if the materialized view has (or recently had) any indexes</entry>
          </row>
          <row>
            <entry><codeph>ispopulated</codeph></entry>
            <entry>boolean</entry>
            <entry> </entry>
            <entry>True if the materialized view is currently populated</entry>
          </row>
          <row>
            <entry><codeph>definition</codeph></entry>
            <entry>text</entry>
            <entry> </entry>
            <entry>Materialized view definition (a reconstructed <codeph>SELECT</codeph>
              command)</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
